{extend name="public:base" /}
{block name="action"}
<a type="button" class="btn btn-w-m btn-primary"
   href="{:url('dc4')}">  导出
</a>
{/block}
{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight" xmlns="http://www.w3.org/1999/html">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-content">
                    <form method="get">
                        <div class="row">
                            <div class="col-sm-3">
                                <select class="form-control m-b" name="sealId" placeholder="印章名称">
                                    <option value="" {if condition="!$params.sealId" } selected {
                                    /if}>所有</option>
                                    {volist name="seals" id="entity"}
                                    <option value="{$entity.id}" {eq name="entity.id" value="$params.sealId" } selected{/eq}>{$entity.name}</option>
                                    {/volist}
                                </select>
                            </div>
                            <div class="col-sm-4" id="dateTime">
                                <div class="row">
                                    <div class="col-sm-6">
                                        <div class="input-group">
                                            <input type="text" name="startTime" id="startTime"
                                                   value="{$params.startTime}"
                                                   readonly unselectable="on"
                                                   placeholder="开始时间"
                                                   class="form-control">
                                            <div class="input-group-addon"><i class="fa fa-calendar"></i></div>
                                            </span>
                                        </div>
                                    </div>
                                    <div class="col-sm-6">
                                        <div class="input-group">
                                            <input type="text" name="endTime" id="endTime" value="{$params.endTime}"
                                                   placeholder="结束时间"
                                                   readonly unselectable="on"
                                                   class="form-control">
                                            <div class="input-group-addon"><i class="fa fa-calendar"></i></div>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-2">
                                <div class="input-group">
                                    <input type="text" name="name" value="{$params.keyword}" placeholder="文件名称"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="col-sm-2">
                                <div class="input-group">
                                    <!--<input type="text" name="code" value="{$params.keyword}" placeholder="申请单号"
                                           class="form-control">-->
                                    <div class="input-group-append">
                                        <button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-search"></i> 搜索</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                    <table class="table table-stripped ">
                        <thead>
                        <tr>
                            <th>#</th>
                            <th>印章名称</th>
                            <th>审批类型</th>
                            <th>文件名称</th>
                            <th>实际次数</th>
                            <th>状态</th>
                            <th>申请时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {notempty name="list"}
                        {volist name="list" id="vo" key="k"}
                        <tr>
                            <td>{$k}</td>
                            <td>{$vo.seal.name}</td>
                            <td>{$vo.approval.type_name}</td>
                            <td>{$vo.name}</td>
                            
                            <td>{$vo.use_count}</td>
                            <td>{$vo.status_txt}</td>
                            <td>{$vo.create_time}</td>
                            <td class="project-actions">
                                {eq name="vo.un_finished" value="true"}
                                <a href="{:url('processFlows', ['id' => $vo.id])}"
                                   class="btn  btn-warning btn-sm process-flow-btn-dialog"> 流程
                                </a>
                                {/eq}
                                <a href="{:url('reviewArchiveListDetail', ['id' => $vo['id']])}"
                                   class="btn btn-primary btn-sm detail"><i
                                        class="fa fa-eye"></i> 详情 </a>
                            </td>
                        </tr>
                        {/volist}
                        {/notempty}
                        </tbody>
                    </table>
                    {$list->render()}
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
<script type="text/javascript">
    $(".process-flow-btn-dialog").on("click", function (e) {
        e.preventDefault();
        $.get($(e.currentTarget).attr("href"), function (data) {
            new ModalDialog({
                content: data,
                closeBtn: false,
                success: function (data) {
                    return true;
                }
            }).show();
        })
    });
    laydate.render({
        elem: "#dateTime",
        //设置开始日期、日期日期的 input 选择器
        //数组格式为 5.3.0 开始新增，之前版本直接配置 true 或任意分割字符即可
        range: ['#startTime', '#endTime']
    });

</script>
{/block}
{block name="css"}
<style type="text/css">
    .layui-timeline-item {
        padding: 10px;
    }

    .layui-timeline-title {
        border-bottom: 1px solid #dfdfdf;
        margin: 0;
        padding: 5px 0;
    }

    .layui-timeline-item:hover {
        background: #ffffff;
        box-shadow: 1px 0px 1em 5px #ebebeb;
        transition: width 2s;
        -webkit-transition: width 2s;
    }

    .layui-timeline-item::marker {
        background-color: #fff;
        content: "";
    }

    .layui-timeline {
        margin: 0;
        padding: 0;
    }

    .vertical-timeline-icon {
        font-size: 12px;
        width: 30px;
        height: 30px;
    }

    .vertical-timeline-content .vertical-date {
        float: none;
    }

    #vertical-timeline::before {
        content: '';
        position: absolute;
        top: 0;
        left: 15px;
        height: 100%;
        width: 1px;
        background: #dfdfdf;
    }

    .vertical-timeline-icon i {
        display: block;
        width: 24px;
        height: 24px;
        position: relative;
        line-height: 24px;
        left: 0;
        top: 0;
        margin-left: 0;
        margin-top: 0;
    }

    .vertical-timeline-content {
        margin-left: 40px;
        padding: 0.4rem 1em;
    }

    .modal-body {
        padding: 0;
    }

    .layui-timeline-title {
        font-size: 12px;
    }

    .vertical-timeline-content::before {
        top: 8px;
    }

    .timeline-item .content {
        border-top: 1px solid #e7eaec !important;
    }

    #vertical-timeline {
        margin: 0 auto;
    }

    .vertical-container {
        width: auto;
        max-width: none;
    }

    .vertical-timeline-block {
        padding-bottom: 10px;
    }
</style>
<link rel="stylesheet" href="__ADMIN__/css/process-timeline.css">

{/block}